<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp" />
 <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="css/style.css"/>      
        <link href="assets/css/codemirror.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/ace.min.css" />
        <link rel="stylesheet" href="font/css/font-awesome.min.css" />
        <!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
		<script src="js/jquery-1.9.1.min.js"></script>
        <script src="assets/js/bootstrap.min.js"></script>
		<script src="assets/js/typeahead-bs2.min.js"></script>           	
		<script src="assets/js/jquery.dataTables.min.js"></script>
		<script src="assets/js/jquery.dataTables.bootstrap.js"></script>
        <script src="assets/layer/layer.js" type="text/javascript" ></script>          
        <script src="assets/laydate/laydate.js" type="text/javascript"></script>
<title>短信编辑</title>
</head>
<body>

<div class="margin clearfix">
 <div class="article_style">
    <div class="add_content" id="form-article-add">
     <ul>
      <li class="clearfix Mandatory">
      <label class="label_name"><i>*</i>短信标题</label><span class="formControls col-10">
	       <input name="文章标题" type="text"  style="width:200px" class="col-xs-10 col-sm-5 "></span>
      <li class="clearfix"><label class="label_name"><i>*</i>短信模板</label>
       <span class="formControls col-4"><select class="form-control" id="form-field-select-1" style="width:200px" >
          <option value="">--选择所属模板--</option>
          <option value="1">节日模板</option>
          <option value="2">促销模板</option>
          <option value="3">新货模板</option>
       </select>
       </span>
      </li>
      <li class="clearfix"><label class="label_name">短信内容</label>
      <span class="formControls col-10"><script id="editor" type="text/plain" style="width:100%;height:200px; margin-left:10px;"></script> </span>
      </li>
     </ul>
	 	</div>
            <div class="Button_operation">
				<button onclick="tiaoz()" class="btn btn-primary radius"  type="submit">保存草稿</button>
				<button onclick="member_edit('短信发送','zzzz.html','1','','600')" class="btn btn-default radius" type="button">重新编辑</button>
				<a title="选择发送" href="javascript:ovid()" id="member_add" class="btn btn-danger radius">选择发送</a>
             </div>
</div> 
</div>
</div>
<!--选择发送-->
<div class="add_menber" id="add_menber_style" style="display:none">
<div class="margin clearfix" >
	  
     <div class="list_style">
     <table class="table table-striped table-bordered table-hover" id="sample-table1" style="width:100%">
     <thead>
		 <tr>
				<th style="width:5%"><label><input type="checkbox" class="ace"><span class="lbl"></span></label></th>
				<th style="width:5%">序号</th>
				<th style="width:10%">合作关系</th>
				<th style="width:15%">名称</th>
				<th style="width:15%">区域</th>
				<th style="width:10%">联系人</th>   
                <th style="width:10%">联系电话</th>
				<th style="width:20%">备注</th>               
				
			</tr>
		</thead>
	<tbody>
		<tr>
        <td><label><input type="checkbox" class="ace"><span class="lbl"></span></label></td>
		<td>1</td>
        <td>会员</td>
        <td>潮汕公司</td>
        <td>北京市大海区</td>
        <td>小明</td>
        <td>12345678932</td>
		<td>电池多用户</td>
        
		</td>
        </tr>
       <tr>
       <td><label><input type="checkbox" class="ace"><span class="lbl"></span></label></td>
	   <td>2</td>
        <td>会员</td>
        <td>花海国企</td>
        <td>北京市大海区</td>
        <td>小强</td>
        <td>12345678932</td>
		<td>大批量订购户</td>
        
		</td>
        </tr>
        <tr>
       <td><label><input type="checkbox" class="ace"><span class="lbl"></span></label></td>
	   <td>3</td>
        <td>会员</td>
        <td>飞翔有限公司</td>
        <td>北京市大海区</td>
        <td>小明</td>
        <td>12345678932</td>
		<td>企业自用</td>
		</td>
        </tr>
        <tr>
        <td><label><input type="checkbox" class="ace"><span class="lbl"></span></label></td>
		<td>4</td>
        <td>会员</td>
        <td>黄石企业</td>
        <td>北京市大海区</td>
        <td>小强</td>
        <td>12345678932</td>
		<td>企业自用</td>
		</td>
		 </tr>
        </tbody>    
     </table>     
     </div>
 </div>

</div> 

</body>
</html>
<script type="text/javascript" src="Widget/ueditor/1.4.3/ueditor.config.js"></script>
<script type="text/javascript" src="Widget/ueditor/1.4.3/ueditor.all.min.js"> </script>
<script type="text/javascript" src="Widget/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script> 
<script type="text/javascript">


function tiaoz(){

	layer.confirm('确认要保存吗？',function(index){
		layer.msg('已保存!',{icon:1,time:1000});
	});
}
/**提交操作**/
function article_save_submit(){
	     var num=0;
		 var str="";
     $(".Mandatory input[type$='text']").each(function(n){
          if($(this).val()=="")
          {
               
			   layer.alert(str+=""+$(this).attr("name")+"不能为空！\r\n",{
                title: '提示框',				
				icon:0,								
          }); 
		    num++;
            return false;            
          } 
		 });
		  if(num>0){  return false;}	 	
          else{
			  layer.alert('保存成功！请选择客户发送',{
               title: '提示框',				
			icon:1,		
			  });
			   layer.close(index);	
		  }		  		     					
	}
$(function(){
	var ue = UE.getEditor('editor');
});

</script>
<script type="text/javascript">
 $('#member_add').on('click', function(){
    layer.open({
        type: 1,
        title: '短信发送',
		maxmin: true, 
		shadeClose: true, //点击遮罩关闭层
        area : ['1000px' , '600px'],
        content:$('#add_menber_style'),
		btn:['发送','取消'],
		yes:function(index,layero){	
		 var num=0;
		 var str="";
     $(".add_menber input[type$='text']").each(function(n){
          if($(this).val()=="")
          {
               
			   layer.alert(str+=""+$(this).attr("name")+"不能为空！\r\n",{
                title: '提示框',				
				icon:0,								
          }); 
		    num++;
            return false;            
          } 
		 });
		  if(num>0){  return false;}	 	
          else{
			  layer.alert('发送成功！',{     
               title: '提示框',				
			icon:1,	
			time:1000	
			  });
			  window.location.href='duanxituis.html';
		  }		  		     				
		}
    });
});
jQuery(function($) {
				var oTable1 = $('#sample-table1').dataTable( {
				"aaSorting": [[ 1, "desc" ]],//默认第几个排序
		"bStateSave": true,//状态保存
		"aoColumnDefs": [
		  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
		  {"orderable":false,"aTargets":[0,2,3,4,5,6,7]}// 制定列不参与排序
		] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox')
					.each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
						
				});
			});

</script>
<script type="text/javascript">
 laydate({
    elem: '#start1',
    event: 'focus' 
});
 laydate({
	elem: '#start2',
    event: 'focus' 
});
function member_edit(title,url,id,w,h){
	layer_show(title,url+'#?='+id,w,h);
}

</script>